<?php
require_once 'common.inc.php';
!in_array('2', $larr) && adminmsg('你没有被赋予操作该项的权限！');

$matches = parse_url($_SERVER['HTTP_REFERER']);

foreach($_POST as $_key => $_value) {
	!ereg("^\_", $_key) && $$_key = $_POST[$_key];
} 
foreach($_GET as $_key => $_value) {
	!ereg("^\_", $_key) && $$_key = $_GET[$_key];
} 
if ('list' == $action) {
	//读取文件内容成为一个变量
		$filename="../push/log/view.php";
		$str = file_get_contents($filename);	
		$str = explode(',',$str);
        include_once MCC_ROOT.'/templates/msystem/view.html';
}elseif('prucess'==$action){

	$str = array_slice($_POST,0,-1);
	$str = implode(',',$str);

	$filename="../push/log/view.php";
	$fp=fopen($filename,'wb+');
	if($fp)
	{
		fwrite($fp,$str);
		fclose($fp);
		adminmsg('更新内容操作成功',"view.php?action=list");
	}else
		adminmsg('更新内容操作失败',"view.php?action=list");

}
?>